<template>
	<view class="my-search-container" :style="{'background-color':bgColor}" @click="gotoSearch">
		<view class="my-search-box" :style="{'border-radius':radius+'px'}">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="my-search-text">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "my-search",
		data() {
			return {

			}
		},
		props: {
			bgColor: {
				type: String,
				default: '#f1f1f1'
			},
			radius: {
				type: Number,
				default: 15
			}
		},
		methods: {
			gotoSearch() {
				this.$emit('click')
			}

		}
	}
</script>

<style lang="scss">
	.my-search-container {

		height: 50px;
		// background-color: #efefef;
		padding: 0 10px;

	}

	.my-search-box {
		height: 40px;
		background-color: #ffffff;
		// border-radius: 15px;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 10px;
	}

	.my-search-text {
		font-size: 15px;
		margin-left: 5px;
	}
</style>